using namespace std;

class Complex{
public:
    double x;
    double y;
    Complex(double a, double b): x(a), y(b) {}
};

ostream& operator<<(ostream& out, const Complex& c)
{
    out <<"("<< c.x << "; " << c.y << ")";
    return out;
}

Complex operator+(const Complex& a, const Complex& b)
{
    return Complex(a.x + b.x, a.y + b.y);
}

Complex operator*(const Complex& a, const Complex& b)
{
    return Complex((a.x * b.x - a.y * b.y), (a.y * b.x + b.x * a.y));
}
